/**
 * @file tileset.h
 * @brief TileSet class definition
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 3 of the License.
 *
 * @author VestniK (Sergey N.Vidyuk) sir.vestnik@gmail.com
 * @date 24 Oct 2008
 */
#ifndef _TileSet_H_
#define _TileSet_H_

#include <QtCore>

#include "mjnexceptions.h"
#include "tile.h"

namespace mjn {

   /** @brief Set of tiles for game
    *
    * All tiles should be created in single place and deleted in single place.
    * This place is here :)
    */
   class TileSet {
      public:
         /// Destructor
         ~TileSet() {clearSet();};
         /// Creates all tiles for game
         void fillSet() throw(IncorrectTileset);
         /// Destroys all tiles for game
         void clearSet();
         /// Returns number of tiles in tile set
         int getTilesCount() const {return tiles.size();};
         /// Returns list of tiles
         const QList<Tile>& getTilesList() const {return tiles;};
      private:
         QList<Tile> tiles;
   };

} // namespace mjn

#endif
